package com.jimmy.medical.wechat.model;

import lombok.Data;
import org.springframework.util.StringUtils;

@Data
public class UserInfoEntity extends ErrorBaseEntity{

	private static final long serialVersionUID = 1L;
	private String openid;
	private String nickname;
	private int sex;
	private String province;
	private String city;
	private String country;
	private String headimgurl;
	private String[] privilege;
	private String unionid;
	
	public boolean isUserInfoFailed(){
		if(!StringUtils.isEmpty(getErrMsg()) && getErrCode() != 0){
			return true;
		}
		return false;
	}
}
